<?php
/**
 * Created by PhpStorm.
 * User: webcat
 * Date: 2019/3/13
 * Time: 19:58
 */
namespace diyclass;

class Rabdno{
    public function GetRandStr($length){
        $str='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
        $len=strlen($str)-1;
        $randstr='';
        for($i=0;$i<$length;$i++){
            $num=mt_rand(0,$len);
            $randstr .= $str[$num];
        }
        return $randstr;
    }

}